import models.Project;
import models.Task;

import org.junit.Before;
import org.junit.Test;

import play.test.Fixtures;
import play.test.UnitTest;

public class C4S12b extends UnitTest {
	@Before
	public void setUp() {
		Fixtures.deleteAll();

	}

	@Test
	public void save2() {

		
		Project p=new Project("smart soft", "best company");
		p.save();
		Task x = new Task("a new Impediment",p );
		x.save();
		Task y=new Task();
		y.save();
		Task z=new Task();
		z.save();
		x.dependentTasks.add(y);
		x.dependentTasks.add(z);
		x.save();
		assertNotNull(x.dependentTasks);
		assertEquals(x.dependentTasks.size(),2);

	}

}
